Optimal. Leaf size=61 \[ \frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}-\frac {x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3888, 3882, 8} \[ \frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}-\frac {x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3882
Rule 3888
Rubi steps
\begin {align*} \int \frac {\cot ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac {\int \cot ^4(c+d x) (-a+a \sec (c+d x)) \, dx}{a^2}\\ &=\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}+\frac {\int \cot ^2(c+d x) (3 a-2 a \sec (c+d x)) \, dx}{3 a^2}\\ &=-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}+\frac {\int -3 a \, dx}{3 a^2}\\ &=-\frac {x}{a}-\frac {\cot (c+d x) (3-2 \sec (c+d x))}{3 a d}+\frac {\cot ^3(c+d x) (1-\sec (c+d x))}{3 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.80, size = 100, normalized size = 1.64 \[ \frac {\sec (c+d x) \left (-12 d x \cos ^2\left (\frac {1}{2} (c+d x)\right )-\tan \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {d x}{2}\right ) \cos \left (\frac {1}{2} (c+d x)\right ) \left (3 \csc \left (\frac {c}{2}\right ) \cot \left (\frac {1}{2} (c+d x)\right )+13 \sec \left (\frac {c}{2}\right )\right )\right )}{6 a d (\sec (c+d x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 64, normalized size = 1.05 \[ -\frac {4 \, \cos \left (d x + c\right )^{2} + 3 \, {\left (d x \cos \left (d x + c\right ) + d x\right )} \sin \left (d x + c\right ) + \cos \left (d x + c\right ) - 2}{3 \, {\left (a d \cos \left (d x + c\right ) + a d\right )} \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.24, size = 66, normalized size = 1.08 \[ -\frac {\frac {12 \, {\left (d x + c\right )}}{a} + \frac {a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 12 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} + \frac {3}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.62, size = 74, normalized size = 1.21 \[ -\frac {\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )}{12 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {1}{4 a d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.60, size = 93, normalized size = 1.52 \[ \frac {\frac {\frac {12 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a} - \frac {24 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {3 \, {\left (\cos \left (d x + c\right ) + 1\right )}}{a \sin \left (d x + c\right )}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.29, size = 65, normalized size = 1.07 \[ -\frac {x}{a}-\frac {\frac {4\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {7\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{6}+\frac {1}{12}}{a\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cot ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________